-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
T13578 setup phalcon environment #13628
Conversation
… for refactoring; Work on image/assets
* 4.0.x: (33 commits) Updated stale to not close issues labelled as bugs Use latest Zephir Parser [#11608] - Removed unused variables [#11608] - Reverting instantiation of the client [#11608] - Removed '_' from variables and methods [#11608] - Refactoring on the connect to check if the object is already initialized/connected [#11608] - Refactoring of the getClient() [#11608] - Fixed tabs [#11608] - Corrections based on review [#10532] - Corrected variable [#10532] - Updated changelog [#10532] - Added case insensitive column map in model [#11608] - Corrected variable name [#11608] - Corrected costructor and changelog [#11608] - Updated the changelog [#11608] - Corrected tests [#11608] - Fixed typos [#11608] - More corrections [#11608] - Modifications to the class; Adjusted tests [#11608] - Changed the comparison for the key on save ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I paused at phalcon/db/adapter/pdo/postgresql.zep
. I will continue a bit later
CHANGELOG-4.0.md
Outdated
- Removed deprecated `Phalcon\Cache/Backend/Xcache` | ||
- Removed deprecated `Phalcon\Mvc/Model/Metadata/Apc` | ||
- Removed deprecated `Phalcon\Mvc/Model/Metadata/Memcache` | ||
- Removed deprecated `Phalcon\Mvc/Model/Metadata/Xcache` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Removed deprecated `Phalcon\Mvc/Model/Metadata/Xcache` | |
- Removed deprecated `Phalcon\Mvc\Model\Metadata\Xcache` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
CHANGELOG-4.0.md
Outdated
- Removed deprecated `Phalcon\Cache/Backend/Memcache` | ||
- Removed deprecated `Phalcon\Cache/Backend/Xcache` | ||
- Removed deprecated `Phalcon\Mvc/Model/Metadata/Apc` | ||
- Removed deprecated `Phalcon\Mvc/Model/Metadata/Memcache` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Removed deprecated `Phalcon\Mvc/Model/Metadata/Memcache` | |
- Removed deprecated `Phalcon\Mvc\Model\Metadata\Memcache` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
CHANGELOG-4.0.md
Outdated
- Removed deprecated `Phalcon\Cache/Backend/Apc` | ||
- Removed deprecated `Phalcon\Cache/Backend/Memcache` | ||
- Removed deprecated `Phalcon\Cache/Backend/Xcache` | ||
- Removed deprecated `Phalcon\Mvc/Model/Metadata/Apc` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Removed deprecated `Phalcon\Mvc/Model/Metadata/Apc` | |
- Removed deprecated `Phalcon\Mvc\Model\Metadata\Apc` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
CHANGELOG-4.0.md
Outdated
- Removed deprecated `Phalcon\Annotations/Adapter/Xcache` | ||
- Removed deprecated `Phalcon\Cache/Backend/Apc` | ||
- Removed deprecated `Phalcon\Cache/Backend/Memcache` | ||
- Removed deprecated `Phalcon\Cache/Backend/Xcache` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Removed deprecated `Phalcon\Cache/Backend/Xcache` | |
- Removed deprecated `Phalcon\Cache\Backend\Xcache` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
CHANGELOG-4.0.md
Outdated
- Removed deprecated `Phalcon\Annotations/Adapter/Apc` | ||
- Removed deprecated `Phalcon\Annotations/Adapter/Xcache` | ||
- Removed deprecated `Phalcon\Cache/Backend/Apc` | ||
- Removed deprecated `Phalcon\Cache/Backend/Memcache` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Removed deprecated `Phalcon\Cache/Backend/Memcache` | |
- Removed deprecated `Phalcon\Cache\Backend\Memcache` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
{ | ||
var prefixedKey, cachedContent; | ||
|
||
if lifetime < 1 { | ||
throw new Exception("The lifetime must be at least 1 second"); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is strange because this method does not use lifetime at all
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah this needs to be removed, and it will once we refactor the cache
@@ -45,7 +45,7 @@ class Factory extends BaseFactory | |||
/** | |||
* @param \Phalcon\Config|array config | |||
*/ | |||
public static function load(var config) -> <BackendInterface> | |||
public static function load(var config) -> object |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my comment above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one I don't think we can change it to the BackendInterface
because it inherits from FactoryInterface
which is used for other factory classes (say Config
, Paginator
etc.) If this is not object
then we have interface problems in compilation
phalcon/cache/backend/file.zep
Outdated
@@ -80,8 +80,8 @@ class File extends Backend | |||
} | |||
|
|||
if fetch safekey, options["safekey"] { | |||
if typeof safekey !== "boolean" { | |||
throw new Exception("safekey option should be a boolean."); | |||
if typeof safekey !== "bool" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure that typeof
returns exactly "bool"
not "boolean"
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed the bool/boolean
if typeof safekey !== "boolean" { | ||
throw new Exception("safekey option should be a boolean."); | ||
if typeof safekey !== "bool" { | ||
throw new Exception("safekey option should be a bool."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO, we can safely use full type name in the human readable messages, eg bool -> boolean.
phalcon/cache/backend/file.zep
Outdated
@@ -100,7 +100,7 @@ class File extends Backend | |||
/** | |||
* Returns a cached content | |||
*/ | |||
public function get(string keyName, var lifetime = null) -> var | null | |||
public function get(string keyName, var lifetime = 1) -> var | null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact I can't realize why
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo that I missed. I was trying to correct the interface so changed the lifetime to int
but that did not work in the end. This has been corrected.
…r was throwing the scanner off
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of minor tweaks?
|
||
The testing suite can be run on your own machine. The main dependency is [Codeception][1] which can be installed using [Composer][6]: | ||
The testing suite can be run on your own machine. The only dependencies for running the testing suite or even developing on Phalcon is [nanobox][9]`. Installation instructions for nanobox can be found [here][10]. Also, the main dependency is [Codeception][1] which can be installed using [Composer][6]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is phrased a bit awkwardly... Maybe .... The only dependencies for running the testing suite are [nanobox][9] and [Codeception][1]. Nanobox can also be used for developing Phalcon, and its installation instructions can be found [in the Nanobox documentation][10]. Codeception can be installed using [Composer][6]:
or something similar? (also, the [nanobox][9]
here isn't rendering as a link...)
@@ -196,3 +214,5 @@ Phalcon Framework Team<br>2017 | |||
[6]: http://getcomposer.org | |||
[7]: https://github.com/phalcon/cphalcon/tree/master/tests/_proxies | |||
[8]: https://wiki.archlinux.org/index.php/Environment_variables | |||
[8]: https://nanobox.io/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect this link isn't working because it's supposed to be a [9]
, here?
```sh | ||
# run this command from project root | ||
/app $ composer install --dev --prefer-source | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is done automatically via nanobox build
, which the first nanobox run
will always call...
```bash | ||
/app $ wget --no-clobber -O /opt/gonano/bin/zephir https://github.com/phalcon/zephir/releases/download/0.11.7/zephir.phar | ||
/app $ chmod +x /opt/gonano/bin/zephir | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These steps are already in the boxfile...
Hello!
In raising this pull request, I confirm the following (please check boxes):
Container base environment for running tests locally.
Thanks